#include<stdio.h>
#include<unistd.h>
int main()
{
    printf("i am a process,my pid is:%d\nmy father's pid is:%d\n",getpid(),getppid());
    pid_t id=fork();
    if(id>0)  //父进程
    {
        printf("i am father process,fork return value is:%d,\nmy pid is:%d\n",id,getpid());
    }
    else if(id==0) //子进程
    {
        printf("i am son process,fork return value is:%d,\nmy pid is:%d\n",id,getpid());
    }
    return 0;
}
